[general]
#A cache path where the current status of vdirsyncer will be stored
status_path = "~/.cache/vdirsyncer/status/"

#Create a new sync connection between two storages we will define
[pair nextcloud_contacts]
a = "nextcloud_contacts_local"
b = "nextcloud_contacts_remote"
collections = ["from a", "from b"]
metadata = ["displayname"]

# A local storage to store the contacts
[storage nextcloud_contacts_local]
type = "filesystem"
# Path to where to store the vcards
path = "~/.local/share/contacts/"
fileext = ".vcf"

# A remote storage to nextcloud
[storage nextcloud_contacts_remote]
type = "carddav"
# Can be obtained from nextcloud
url.fetch = ["command", "pass", "env/url_carddav"]
username.fetch = ["command", "pass", "env/user"]
password.fetch = ["command", "pass", "env/password"]
# password.fetch = ["command", "passphrase"]

## SSL certificate fingerprint
## example:
## echo | openssl s_client -connect disroot.org:443 |& openssl x509 -fingerprint -noout
# verify_fingerprint = "FA:00:F5:1A:9E:FF:B9:11:8F:C9:3F:5D:39:F7:CF:A8:3F:AB:8D:2C"
## Verify ssl certificate. Set to false if it is self signed and not installed on local machine
# verify = true

[pair calendar]
a = "calendar_local"
b = "calendar_remote"
collections = ["from a", "from b"]
metadata = ["displayname"]

[storage calendar_local]
type = "filesystem"
path = "~/.local/share/calendar"
fileext = ".ics"

[storage calendar_remote]
type = "caldav"
#Can be obtained from nextcloud
url.fetch = ["command", "pass", "env/url_carddav"]
username.fetch = ["command", "pass", "env/user"]
#Instead of inserting my plaintext password I fetch it using pass
password.fetch = ["command", "pass", "env/password"]
# password.fetch = ["command", "passphrase"]

##SSL certificate fingerprint
# verify_fingerprint = "FA:00:F5:1A:9E:FF:B9:11:8F:C9:3F:5D:39:F7:CF:A8:3F:AB:8D:2C"
## Verify ssl certificate. Set to false if it is self signed and not installed on local machine
# verify = true
